package com.hunter.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @Classname SqlSession
 * @Description TODO
 * @Date 2021/7/22 23:18
 * @Created by haojie.liao
 */
public interface SqlSession {

    //查询所有
    <E> List<E> selectList(String statementId, Object... params) throws SQLException, IllegalAccessException, IntrospectionException, InstantiationException, NoSuchFieldException, InvocationTargetException, ClassNotFoundException;

    //根据条件查询单个
    public <T> T selectOne(String statementId, Object... params) throws SQLException, IllegalAccessException, IntrospectionException, InstantiationException, ClassNotFoundException, InvocationTargetException, NoSuchFieldException;

    //为Dao接口生成代理实现类
    public <T> T getMapper(Class<?> mapperClass);

}
